package com.sxkf.template.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author 杨玉龙
 * @since 2024-11-22 11:49:23
 */
@Getter
@Setter
@TableName("t_product")
@ApiModel(value = "Product对象", description = "")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品ID")
      @TableId("id")
    private String id;

    @ApiModelProperty("商品名称")
    @TableField("name")
    private String name;

    @ApiModelProperty("商品描述 副标题")
    @TableField("sub_title")
    private String subTitle;

    @ApiModelProperty("商铺ID")
    @TableField("store_id")
    private String storeId;

    @ApiModelProperty("商品分类ID")
    @TableField("category_id")
    private String categoryId;

    @ApiModelProperty("品牌ID")
    @TableField("brand_id")
    private String brandId;

    @ApiModelProperty("商品销量")
    @TableField("sale_count")
    private Integer saleCount;

    @ApiModelProperty("搜索次数")
    @TableField("search_count")
    private Integer searchCount;

    @ApiModelProperty("评论数量")
    @TableField("comment_count")
    private Integer commentCount;

    @ApiModelProperty("收藏数量")
    @TableField("like_count")
    private Integer likeCount;

    @ApiModelProperty("视频地址")
    @TableField("video_url")
    private String videoUrl;

    @ApiModelProperty("图片url")
    @TableField("image_url")
    private String imageUrl;

    @ApiModelProperty("创建时间")
      @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty("修改时间")
      @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty("服务说明")
    @TableField("serve_intro")
    private String serveIntro;

    @ApiModelProperty("状态(0=未上架，1=已上架)")
    @TableField("state")
    private String state;

    @ApiModelProperty("主图")
    @TableField("main_image")
    private String mainImage;

    @ApiModelProperty("详情图")
    @TableField("detail_img")
    private String detailImg;

    @ApiModelProperty("是否可拼团")
    @TableField("is_team")
    private String isTeam;


    @ApiModelProperty("商品原价")
    @TableField("old_price")
    private BigDecimal oldPrice;

    @ApiModelProperty("商品最低价")
    @TableField("lowest_price")
    private BigDecimal lowestPrice;

    @ApiModelProperty("拼团所需人数（当id_team为1时必传）")
    @TableField("need_count")
    private Integer needCount;

    @ApiModelProperty("拼团持续时间（当id_team为1时必传，单位:分钟）")
    @TableField("duration")
    private Integer duration;

//    /**
//     * 运费
//     */
//    @TableField(value = "freight")
//    @ApiModelProperty(value = "运费")
//    private BigDecimal freight;

    /*-----------------附加字段----------------------*/

    /**
     * 商铺信息
     */
    @ApiModelProperty(value = "商铺信息")
    @TableField(exist = false)
    private Store store;

    @ApiModelProperty(value = "优惠券")
    @TableField(exist = false)
    private List<Coupon> coupons;


    /**
     * SKU对象
     */
    @TableField(exist = false)
    private List<ProductSpec> productSpec;
}
